package com.i2863.receipt.userUtil;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

import java.util.Properties;

/**
 * 常量类
 * @author xuweiwei
 * @date 2017/5/31
 */
public class Constant {



    private static Logger logger = LoggerFactory.getLogger(Constant.class);


     /** 加密字符串前缀 */
    public static final   String KEY_PREFIX = "Z5";

    /** 加密字符串后缀 */
    public static final String KEY_SUFFIX = "I2863";


    /** 最大秒数 **/
    public static final int MAX_SECOND = 10;



    /** 用户中心 */
    public  static String ucenter = null;

    /**
     * 配置系统
     */
    public static String appconfig = null;

    static{
        Properties properties = null;
        try {
            properties = PropertiesLoaderUtils.loadProperties(new ClassPathResource("config.properties"));
            ucenter = properties.getProperty("ucenter.url").trim();
            appconfig = properties.getProperty("appconfig.url").trim();
        }catch (Exception e){
            logger.error("初始化错误",e);
        }

    }



}
